//
//  UIViewController+YY.h
//  YiYunSTP
//
//  Created by 易云物联 on 2019/3/29.
//  Copyright © 2019 yiyuniot. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,UserAccountState) {
    /** 账号失效 */
    UserAccountStateTokenFailure,
    /** 未登录 */
    UserAccountStateNoLogin,
};
@interface UIViewController (YY)<UINavigationControllerDelegate>

-(void)setupForDismissKeyboard;

/** 导航栏图片 */
-(UIImage *)navigationBarBackgroundImage;

+ (UIViewController *)yy_visibleViewController;

///**  */
//@property (nonatomic, copy) ReloadData reloadData;
/**  */
@property (nonatomic, copy) void(^callBackReloadData)(void);
/** 账号检测
 * @param state      账户状态
 * @param refresh    登陆成功之后是否需要刷新
 * @param callBackReloadData   回调代码块
 */
-(void)accountCheckWithAccountState:(UserAccountState)state callbackRefresh:(BOOL)refresh callBack:(nullable void(^)(void))callBackReloadData;

@end

NS_ASSUME_NONNULL_END
